import { ApiProperty } from "@nestjs/swagger";
import { IsNotEmpty, MinLength } from "class-validator";


export class LoginUserDto {

    @ApiProperty({example:"zhangsan"})
    @IsNotEmpty({ message: "用户名不能为空" })
    username: string;
    
    @ApiProperty({example:"111111"})
    @IsNotEmpty({ message: '密码不能为空' })
    @MinLength(6, { message: '密码不能少于 6 位' })
    password: string;

}
